package com.zhuoxin.bean.system;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.zhuoxin.bean.EntitySupport;

@Entity
@Table(name = "sys_role_user")
public class SysRoleUser extends EntitySupport {
	private static final long serialVersionUID = -1536572746471447004L;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "fkUserId")
	private SysUser user;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "fkRoleId")
	private SysRole role;

	public SysRoleUser() {
		super();
	}

	public SysRoleUser(SysUser user, SysRole role) {
		super();
		this.user = user;
		this.role = role;
	}

	public SysUser getUser() {
		return user;
	}

	public void setUser(SysUser user) {
		this.user = user;
	}

	public SysRole getRole() {
		return role;
	}

	public void setRole(SysRole role) {
		this.role = role;
	}

}
